package com.wshl.aijiuunion.view.adapter;

import android.support.v7.widget.RecyclerView;
import android.widget.LinearLayout;

import com.wshl.aijiuunion.R;
import com.wshl.aijiuunion.view.bean.RechargeListBean;

import cn.bingoogolapple.baseadapter.BGARecyclerViewAdapter;
import cn.bingoogolapple.baseadapter.BGAViewHolderHelper;

/**
 * Created buy 风凊扬 on 2019/11/6 0006
 */
public class RechargeListAdapter extends BGARecyclerViewAdapter<RechargeListBean.DataBean> {
    public RechargeListAdapter(RecyclerView recyclerView) {
        super(recyclerView, R.layout.item_rechargelist);
    }

    @Override
    protected void fillData(BGAViewHolderHelper helper, int position, RechargeListBean.DataBean model) {

        LinearLayout rlRecharge = helper.getView(R.id.rl_recharge);
        if (model.isChecked()) {
            rlRecharge.setSelected(true);
        } else {
            rlRecharge.setSelected(false);
        }

        helper.setText(R.id.tv_yuanjia, "¥" + model.getOriginal_price() + "");
        helper.setText(R.id.tv_shifu, "实付" + model.getReal_price() + "");

    }


}
